/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.fullhappy.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author hiep
 */
@Entity
@Table(name = "singer")
public class Singer implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    
    @Column(name = "singer_id")
    private Integer singerId;
    
    @Column(name = "name")
    private String name;
    @Lob
    @Column(name = "description")
    private String description;
    
    @Column(name = "user_create_id")
    private int userCreateId;
    
    @Column(name = "creation_time")
    private long creationTime;
    
    @Column(name = "enable")
    private short enable;
    @Column(name = "avatar_image_link")
    private String avatarImageLink;

    public Singer() {
    }

    public Singer(Integer singerId) {
        this.singerId = singerId;
    }

    public Singer(Integer singerId, String name, int userCreateId, long creationTime, short enable) {
        this.singerId = singerId;
        this.name = name;
        this.userCreateId = userCreateId;
        this.creationTime = creationTime;
        this.enable = enable;
    }

    public Integer getSingerId() {
        return singerId;
    }

    public void setSingerId(Integer singerId) {
        this.singerId = singerId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getUserCreateId() {
        return userCreateId;
    }

    public void setUserCreateId(int userCreateId) {
        this.userCreateId = userCreateId;
    }

    public long getCreationTime() {
        return creationTime;
    }

    public void setCreationTime(long creationTime) {
        this.creationTime = creationTime;
    }

    public short getEnable() {
        return enable;
    }

    public void setEnable(short enable) {
        this.enable = enable;
    }

    public String getAvatarImageLink() {
        return avatarImageLink;
    }

    public void setAvatarImageLink(String avatarImageLink) {
        this.avatarImageLink = avatarImageLink;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (singerId != null ? singerId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Singer)) {
            return false;
        }
        Singer other = (Singer) object;
        if ((this.singerId == null && other.singerId != null) || (this.singerId != null && !this.singerId.equals(other.singerId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return name;
    }
    
}
